
#import <UIKit/UIKit.h>
#import <OpenGLES/EAGL.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <MessageUI/MFMailComposeViewController.h>
#import "Texture2D.h"

#define USE_DEPTH_BUFFER 1
@interface MyViewController : UIViewController<MFMailComposeViewControllerDelegate>
@end

@interface MyView : UIView<UIAccelerometerDelegate,UITextFieldDelegate,UITextViewDelegate,UIPickerViewDelegate,UIAlertViewDelegate> 
{
	NSTimer * m_Timer;
	
	/* The pixel dimensions of the backbuffer */
	GLint backingWidth;
	GLint backingHeight;
	
	EAGLContext *context;
	/* OpenGL names for the renderbuffer and framebuffers used to render to this view */
	GLuint viewRenderbuffer, viewFramebuffer;
	
	/* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
	GLuint depthRenderbuffer;
	
	bool	m_interrupt;
	int     m_iLastTime;
	
	UIView *  m_GControll;
	MyViewController * m_ViewController;
}
@property(nonatomic,readonly) MyViewController *m_ViewController;

- (id)initWithFrame:(CGRect)frame;
- (void)AddControll;
- (void)DelControll;
- (void)OnTimer;
- (void)onExit;
- (void)SetInterrupt:(bool)interrupt;

@end
